<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="java.sql.*"%>
<%@ page import="com.cys.db.DBHelper"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>参数设置</title>
<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/stylesheet.css" rel="stylesheet">
<link href="css/index.css" rel="stylesheet">
<link href="icon/font-awesome.css" rel="stylesheet">


<!-- Le fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144"
	href="img/apple-touch-icon-144-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
	href="img/apple-touch-icon-114-precomposed.html">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
	href="img/apple-touch-icon-72-precomposed.html">
<link rel="apple-touch-icon-precomposed"
	href="img/apple-touch-icon-57-precomposed.html">
<style type="text/css">
.pbtn1 {
	border: solid 2px #dcdcdc;
	padding: 4px 14px 4px 34px;
	color: #959595;
}

.btn1 {
	background: url("images/ok.gif") no-repeat 8px center;
	background-color: #f9f9f9;
}
</style>
</head>

<body style="width: 85%">
	<div id="content">
		<!-- Content start -->
		<div class="inner_content">
			<div class="widgets_area">
				<div class="row-fluid">
					<div class="span12">
						<div class="daohanglink" style="">
							<span class="daohang"></span> <span>首页</span><span>></span> <span>参数设置</span>
						</div>
						<div class="well brown">


							<div class="well-content" style="border: 0px;">
								<table
									class="table table-striped table-bordered table-hover datatable">
									<tr>
										<td>卷帘机参数：</td>
										<%
											Connection conn1 = null;
											Statement stat1 = null;
											ResultSet rs1 = null;
											//根据数据库参数取得一个数据库连接
											conn1 = DBHelper.getConn();
											stat1 = conn1.createStatement();
											String sql1 = "select * from t_data_dev_curtain_controlor order by data_time limit 1";
											rs1 = stat1.executeQuery(sql1);
											while (rs1.next()) {
										%>
										<td>光照极限值<input type="text"
											value="<%out.print("" + rs1.getString("alarm_brightness") + "");%>"></td>
										<td>位置极限值：<input type="text"
											value="<%out.print("" + rs1.getString("alarm_positon") + "");%>"></td>
										<td>模式：<select name="curtain" id="curtain" onmouseover=""
											class="otextcss">
												<option value="0">自动</option>
												<option value="1">手动</option>
										</select>
										</td>
										<td><input type="submit" value="保存"
											onmouseover="this.style.borderColor='#75cd02'"
											onmouseout="this.style.borderColor='#dcdcdc'"
											class="btn1 pbtn1" /></td>
										<%
											}
											rs1.close();
											stat1.close();
											conn1.close();
										%>
									</tr>
									<tr>
										<td>卷帘机参数：</td>
										<%
											Connection conn = null;
											Statement stat = null;
											ResultSet rs = null;
											//根据数据库参数取得一个数据库连接
											conn = DBHelper.getConn();
											stat = conn.createStatement();
											String sql = "select * from t_user order by id limit 1";
											rs = stat.executeQuery(sql);
											while (rs.next()) {
										%>
										<td>光照极限值<input type="text"
											value="<%out.print("" + rs.getString("id") + "");%>"></td>
										<td>位置极限值：<input type="text"
											value="<%out.print("" + rs.getString("name") + "");%>"></td>
										<td>模式：<select name="curtain" id="curtain" onmouseover=""
											class="otextcss">
												<option value="0">自动</option>
												<option value="1">手动</option>
										</select>
										</td>
										<td><input type="submit" value="保存"
											onmouseover="this.style.borderColor='#75cd02'"
											onmouseout="this.style.borderColor='#dcdcdc'"
											class="btn1 pbtn1" /></td>
										<%
											}
											rs.close();
											stat.close();
											conn.close();
										%>
									</tr>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<!-- Le javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<script src="js/jquery-1.10.2.js"></script>
	<script src="js/jquery-ui-1.10.3.js"></script>
	<script src="js/bootstrap.js"></script>

	<script src="js/library/jquery.collapsible.min.js"></script>
	<script src="js/library/jquery.mCustomScrollbar.min.js"></script>
	<script src="js/library/jquery.mousewheel.min.js"></script>
	<script src="js/library/jquery.uniform.min.js"></script>


	<script src="js/library/jquery.sparkline.min.js"></script>
	<script src="js/library/chosen.jquery.min.js"></script>
	<script src="js/library/jquery.easytabs.js"></script>
	<script src="js/library/flot/excanvas.min.js"></script>
	<script src="js/library/flot/jquery.flot.js"></script>
	<script src="js/library/flot/jquery.flot.pie.js"></script>
	<script src="js/library/flot/jquery.flot.selection.js"></script>
	<script src="js/library/flot/jquery.flot.resize.js"></script>
	<script src="js/library/flot/jquery.flot.orderBars.js"></script>
	<script src="js/library/maps/jquery.vmap.js"></script>
	<script src="js/library/maps/maps/jquery.vmap.world.js"></script>
	<script src="js/library/maps/data/jquery.vmap.sampledata.js"></script>
	<script src="js/library/jquery.autosize-min.js"></script>
	<script src="js/library/charCount.js"></script>
	<script src="js/library/jquery.minicolors.js"></script>
	<script src="js/library/jquery.tagsinput.js"></script>
	<script src="js/library/fullcalendar.min.js"></script>
	<script src="js/library/footable/footable.js"></script>
	<script src="js/library/footable/data-generator.js"></script>

	<script src="js/library/bootstrap-datetimepicker.js"></script>
	<script src="js/library/bootstrap-timepicker.js"></script>
	<script src="js/library/bootstrap-datepicker.js"></script>
	<script src="js/library/bootstrap-fileupload.js"></script>
	<script src="js/library/jquery.inputmask.bundle.js"></script>

	<script src="js/library/jquery.dataTables.js"></script>

	<script src="js/flatpoint_core.js"></script>

	<script src="js/datatables.js"></script>

</body>
</html>
